function [ExtraNodes, ExtraWeights, NodesToSkip] = QuadLogExtraPtNodes(order)
% Return the parameters of the special points for the extra point log singularity quadrature rule
% Inputs:
%	order:		Order of the rule we are looking for
%			Values 2,3,4,5,6,8,10,12,14,16 are supported
% Returned:
%	ExtraNodes:	Location of the extra quadrature nodes
%	ExtraWeights:	Quadrature weights at the extra quadrature nodes
%	NodesToSkip:	Number of nodes around the singularity to skip (0*h .. (NodesToSkip-1)*h nodes)
% Deps:			-
% MatlabDeps:		-
%
% Edited Barnett to add Alpert's new 2013 band-limited nodes ("order pi")
% 12/16/13

    if (order == 2)

	M = [
		1.591549430918953D-01  5.000000000000000D-01
	];
	NodesToSkip = 1;

    elseif (order == 3)

	M = [
		1.150395811972836D-01  3.913373788753340D-01
		9.365464527949632D-01  1.108662621124666D+00
	];
	NodesToSkip = 2;

    elseif (order == 4)

	M = [
		2.379647284118974D-02  8.795942675593887D-02
		2.935370741501914D-01  4.989017152913699D-01
		1.023715124251890D+00  9.131388579526912D-01
	];
	NodesToSkip = 2;

    elseif (order == 5)

	M = [
		2.339013027203800D-02  8.609736556158105D-02
		2.854764931311984D-01  4.847019685417959D-01
		1.005403327220700D+00  9.152988869123725D-01
		1.994970303994294D+00  1.013901778984250D+00
	];
	NodesToSkip = 3;

    elseif (order == 6)

	M = [
		4.004884194926570D-03  1.671879691147102D-02
		7.745655373336686D-02  1.636958371447360D-01
		3.972849993523248D-01  4.981856569770637D-01
		1.075673352915104D+00  8.372266245578912D-01
		2.003796927111872D+00  9.841730844088381D-01
	];
	NodesToSkip = 3;

    elseif (order == 8)

	M = [
		6.531815708567918D-03  2.462194198995203D-02
		9.086744584657729D-02  1.701315866854178D-01
		3.967966533375878D-01  4.609256358650077D-01
		1.027856640525646D+00  7.947291148621894D-01
		1.945288592909266D+00  1.008710414337933D+00
		2.980147933889640D+00  1.036093649726216D+00
		3.998861349951123D+00  1.004787656533285D+00
	];
	NodesToSkip = 5;

    elseif (order == 10)

	M = [
		1.175089381227308D-03  4.560746882084207D-03
		1.877034129831289D-02  3.810606322384757D-02
		9.686468391426860D-02  1.293864997289512D-01
		3.004818668002884D-01  2.884360381408835D-01
		6.901331557173356D-01  4.958111914344961D-01
		1.293695738083659D+00  7.077154600594529D-01
		2.090187729798780D+00  8.741924365285083D-01
		3.016719313149212D+00  9.661361986515218D-01
		4.001369747872486D+00  9.957887866078700D-01
		5.000025661793423D+00  9.998665787423845D-01
	];
	NodesToSkip = 6;

    elseif (order == 12)

	M = [
		1.674223682668368E-03  6.364190780720557E-03
		2.441110095009738E-02  4.723964143287529E-02
		1.153851297429517E-01  1.450891158385963E-01
		3.345898490480388E-01  3.021659470785897E-01
		7.329740531807683E-01  4.984270739715340E-01
		1.332305048525433E+00  6.971213795176096E-01
		2.114358752325948E+00  8.577295622757315E-01
		3.026084549655318E+00  9.544136554351155E-01
		4.003166301292590E+00  9.919938052776484E-01
		5.000141170055870E+00  9.994621875822987E-01
		6.000001002441859E+00  9.999934408092805E-01
	];
	NodesToSkip = 7;

    elseif (order == 14)

	M = [
		9.305182368545380E-04  3.545060644780164E-03
		1.373832458434617E-02  2.681514031576498E-02
		6.630752760779359E-02  8.504092035093420E-02
		1.979971397622003E-01  1.854526216643691E-01
		4.504313503816532E-01  3.251724374883192E-01
		8.571888631101634E-01  4.911553747260108E-01
		1.434505229617112E+00  6.622933417369036E-01
		2.175177834137754E+00  8.137254578840510E-01
		3.047955068386372E+00  9.235595514944174E-01
		4.004974906813428E+00  9.821609923744658E-01
		4.998525901820967E+00  1.000047394596121E+00
		5.999523015116678E+00  1.000909336693954E+00
		6.999963617883990E+00  1.000119534283784E+00
		7.999999488130134E+00  1.000002835746089E+00
	];
	NodesToSkip = 9;

    elseif (order == 16)
	M = [
		8.371529832014113E-04  3.190919086626234E-03
		1.239382725542637E-02  2.423621380426338E-02
		6.009290785739468E-02  7.740135521653088E-02
		1.805991249601928E-01  1.704889420286369E-01
		4.142832599028031E-01  3.029123478511309E-01
		7.964747731112430E-01  4.652220834914617E-01
		1.348993882467059E+00  6.401489637096768E-01
		2.073471660264395E+00  8.051212946181061E-01
		2.947904939031494E+00  9.362411945698647E-01
		3.928129252248612E+00  1.014359775369075E+00
		4.957203086563112E+00  1.035167721053657E+00
		5.986360113977494E+00  1.020308624984610E+00
		6.997957704791519E+00  1.004798397441514E+00
		7.999888757524622E+00  1.000395017352309E+00
		8.999998754306120E+00  1.000007149422537E+00
	];
	NodesToSkip = 10;
        
    elseif (order == pi)
	M = [
       0.1001017919849876E-02 0.3855156111030767E-02
       0.1547927245597785E-01 0.3092653102489186E-01
       0.7759862802914257E-01 0.1016660804454295E+00
       0.2353428808371396E+00 0.2212483541723430E+00
       0.5313778286303336E+00 0.3742708828331500E+00
       0.9860522499889081E+00 0.5339562868200986E+00
       0.1593656014048848E+01 0.6771622243238485E+00
       0.2330857870688265E+01 0.7921431108587873E+00
       0.3167794996250213E+01 0.8768432234349217E+00
       0.4075442999202180E+01 0.9342981809137300E+00
       0.5028981084850956E+01 0.9695441423223279E+00
       0.6009047244830998E+01 0.9883431595654529E+00
       0.7002147952635876E+01 0.9965589345613159E+00
       0.8000354827049883E+01 0.9992832232003528E+00
       0.9000035834266430E+01 0.9999068169642388E+00
       0.1000000176574551E+02 0.9999938235631056E+00
       0.1100000002444375E+02 0.9999998688848477E+00
	];
	NodesToSkip = 12;
    else
	error(sprintf('QuadLogExtraPtNodes: Only orders 2,3,4,5,6,8,10,12,14,16, and pi are supported, %d is not', order));
    end

    ExtraNodes = M(:,1);
    ExtraWeights = M(:,2);

end
